package domain;

import java.io.Serializable;

public class Teacher implements Comparable<Teacher>, Serializable {
    private int id;
    private String name;
    private Department department;

    public Teacher(int id, String name, Department department) {
        this.id = id;
        this.name = name;
        this.department = department;
    }
    @Override
    public String toString() {
        return "Department{" +
                "id=" + id + '\'' +
                ", name='" + name + '\'' +
                ", department='" + department + '\'' +
                '}';
    }
    public Teacher(String name,Department department){
        this.name = name;
        this.department=department;
    }
    public Teacher(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

    @Override
    public int compareTo(Teacher o) {
        return (int) (o.id - this.id);
    }
}
